package com.sunday.factory.logger;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @ClassName Logger
 * @Author JiangHai
 * @Date 2021/9/5 13:42
 **/
public class Logger {

    private FileWriter fileWriter;

    public Logger(){
        File file = new File("D:\\kt\\log.txt");
        try {
            fileWriter = new FileWriter(file,true);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public void write(String logMsg) throws IOException {
        fileWriter.write(logMsg);
    }
}
